import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { visualizer } from "rollup-plugin-visualizer";
// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    react(),
    visualizer({
      open: true, // 自动打开浏览器
      gzipSize: true, // 显示 gzip 体积
      brotliSize: true, // 显示 brotli 体积
      filename: "stats.html",
    }),
  ],
  server: {
    open: true,
    port: 9255,
  },
  resolve: {
    extensions: [".mjs", ".js", ".mts", ".ts", ".jsx", ".tsx", ".json"],
  },
});
